package com.boliq.lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.boliq.lol.R;
import com.boliq.lol.adapter.NewsArticleAdapter;
import com.boliq.lol.adapter.NewsMatchAdapter;
import com.boliq.lol.base.BaseFragment;
import com.boliq.lol.bean.NewsArticleBean;
import com.boliq.lol.bean.NewsMatchBean;

public class NewsMatchFragment extends BaseFragment {

    private RecyclerView mRecyclerView;
    private NewsMatchAdapter maAdapter;
    @Override
    protected int rootLayout() {
        return R.layout.saishi_mian_view;
    }
    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.rv_content_list1);
    }
    @Override
    protected void initData(){
        NewsMatchBean ma1=new NewsMatchBean("11.4&11.5云顶之弈更新：天选系统小型调整",R.drawable.na1,"LoL","游戏日报","50.4万次");
        NewsMatchBean ma2=new NewsMatchBean("盟物堂：国外大神完美比例还原超炫酷沙皇",R.drawable.na2,"LoL","英雄联盟盟物堂","323次");
        NewsMatchBean ma3=new NewsMatchBean("3月5日18点不停机更新公告",R.drawable.na3,"LoL","英雄联盟官方 ","49.3万次");
        NewsMatchBean ma4=new NewsMatchBean("弈招致胜：云顶速成大师诀窍之站位篇",R.drawable.na4,"LoL","北派攻略","5.1万次");
        NewsMatchBean ma5=new NewsMatchBean("恭喜EDG达成LPL一万杀成就！",R.drawable.na5,"LoL","英雄联盟赛事官方","2539次");
        maAdapter = new NewsMatchAdapter();
        maAdapter.addData(ma1);
        maAdapter.addData(ma2);
        maAdapter.addData(ma3);
        maAdapter.addData(ma4);
        maAdapter.addData(ma5);
    }

    @Override
    protected void bindEvent() {

    }
    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(maAdapter);

    }
}
